<extend name="Base/layout" />
<block name="content">
<!--     <div class="layui-breadcrumb crumbs shadow" lay-separator="/">         
        <a href="/">首页</a>
        <a>文章</a> 
    </div> -->
    <div class="page-left">
        <if condition="$art['auditing']">
        <div class="blog-detail shadow" data-id="{$art.id}" data-mid="{$art.admin_id}">
            <div class="blog-detail-title"><span>{$art.title}</span></div>
            <div class="blog-info">
                <span title="时间"><i class="iconfont" style="font-size: 17px;">&#xe665;</i>{$art.addtime|format_datetime=2}</span>
                <span title="作者"><i class="layui-icon">&#xe612;</i>{$username}</span>
                <span title="标签"><i class="iconfont" style="font-size: 17px;">&#xe690;</i>{$art.name}</span>
                <span class="info" title="浏览次数"><i class="iconfont" style="font-size: 21px;">&#xe71a;</i>{$art.hit}</span>
                <span class="info" title="评论数"><a id="comment_count" href="#comment"><i class="iconfont" style="font-size: 17px;">&#xe6ad;</i>{$art.comment}</a></span>
            </div>
            <div class="blog-detail-content">{$art.content}</div>
            <div class="blog-detail-footer"> 
                <p>本文作者：Huason</p>
                <p>地址：<a href="{$Think.server.url}" target="_blank">{$art.title}</a></p>
                <div class="blog-pages">
                    <ul>
                    <if condition="$art['prev']"><li class="blog-prev blog-pn">上一篇：<a href="/article/{$art.prev.id}.html" title="{$art.prev.title}">{$art.prev.title}</a></li></if>
                    <if condition="$art['next']"><li class="blog-next blog-pn">下一篇：<a href="/article/{$art.next.id}.html" title="{$art.next.title}">{$art.next.title}</a></li></if>
                    </ul>
                </div>
            </div>
        </div>
        </if>
        <div class="blog-tag shadow">
            <fieldset class="layui-elem-field layui-field-title">
                <legend>评论</legend>
                <div class="layui-field-box <if condition="!session('openid')">center</if>">
                    <if condition="!session('openid')">
                    <a class="layui-btn layui-btn-normal" href="{:U('/qq_login')}" style="margin-top:5px;">请登录后评论</a>
                    <else/>
                    <form class="layui-form blog-editor" id="comment-form">
                        <div class="layui-form-item">
                            <textarea class="layui-textarea layui-hide" name="content" lay-verify="content" id="remarkEditor" placeholder="请输入文章内容">
                            </textarea>
                        </div>
                        <div class="layui-form-item">
                            <button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="remark">提交评论</button>
                        </div>
                    </form>
                    </if>
                </div>
            </fieldset>
            <h2 id="comment">评论</h2>
            <div>
                <dd class="review" id="comments">
                </dd>
                <div class="hf">
                    
                    <form class="layui-form"> 
                        <textarea id="reply_review_from" type="text" class="layui-textarea" name="content" autocomplete="off" maxlength="100" placeholder="请输入留言内容" lay-verify="reply_review" style="height:105px;"></textarea>
                        <if condition="!session('openid')">
                        <a class="layui-btn layui-btn-normal" href="{:U('/qq_login')}" style="margin-top:5px;">请登录后回复</a>
                        <else/>
                        <button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="reply_review" style="margin-top:10px;">回复</button>
                        </if>
                    </form>
                    
                </div>
            </div>
        </div>
    </div>
    <div class="page-right topic">
        <include file="Base:category" />
        <div id="article_hot_list" class="blog-tag shadow">
            <h2>热门文章</h2>
            <ul>
                <foreach name="hot_list"  item="art" key="k">
                <li>
                <span class="num">{$k+1|zero_num}</span><a title="{$art.title}" href="{:U('/article/'.$art['id'])}">{$art.title}</a>
                <span class="info" title="浏览次数"><i class="iconfont" style="font-size: 16px;">&#xe71a;</i> {$art['hit']}</span></li>
                </foreach>
            </ul>
        </div>
        <div class="blog-tag shadow">
            <h2>最新文章</h2>
            <ul>
                <foreach name="new_list"  item="art" key="k">
                <li>
                <span class="num">{$k+1|zero_num}</span><a title="{$art.title}" href="{:U('/article/'.$art['id'])}">{$art.title}</a>
                <span class="info" title="评论次数"><i class="iconfont" style="font-size: 15px;">&#xe6ad;</i> {$art['comment']}</span>
                </foreach>
            </ul>
        </div>
        <include file="Base:link" />
    </div>
</block>
<block name="urls">
    review:"{:U('review/addReview')}",
    reply_review:"{:U('ReplyReview/addReplyReview')}",
    upvote:"{:U('review/upvote')}",
    upvote_reply:"{:U('ReplyReview/upvote')}",
    comment_page:"{:U('review/page')}"
</block>
<block name="javascript">
<script src="__JS__/index.js"></script>
<script type="text/javascript">
    $(function(){
        Index.initialize({
        });
    });
</script>
</block>